package com.example.demo.Proxy;

import com.example.demo.mapper.UserDao;
import com.example.spect.MyAspect;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

public class MyProxy  implements InvocationHandler {
private UserDao userDao;
    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        MyAspect myAspect = new MyAspect();
        myAspect.check_Permissions();
        Object obj = method.invoke(userDao,args);
        return obj;
    }
}
